<?php
/**
*
* @package shopBB
* @copyright (c) 2008 EXreaction, Lithium Studios
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

$versions = array(
	'0.3.0'		=> array(
		'config_add' => array(
			array('shop_enabled', true),
			array('shop_seo', false),
			array('shop_currency', 'shopbb_points'),
			array('shop_buy_currency', false),
			array('shop_sell_currency', false),
		),

		'permission_add' => array(
			'a_shop_manage',
		),

		'table_add' => array(
			array('phpbb_shop_items', array(
				'COLUMNS'		=> array(
					'item_id'				=> array('UINT', NULL, 'auto_increment'),
					'user_id'				=> array('UINT', 0),
					'user_ip'				=> array('VCHAR:40', ''),

					'item_name'				=> array('STEXT_UNI', '', 'true_sort'),
					'item_name_clean'		=> array('VCHAR_CI', ''),
					'item_desc'				=> array('MTEXT_UNI', ''),
					'item_desc_uid'			=> array('VCHAR:8', ''),
					'item_desc_bitfield'	=> array('VCHAR', ''),
					'item_desc_options'		=> array('UINT:11', 7),
					'item_time'				=> array('TIMESTAMP', 0),
					'item_approved'			=> array('BOOL', 1),
					'item_reported'			=> array('BOOL', 0),

					'item_cost'				=> array('DECIMAL:8', 0),

					'item_inventory'		=> array('INT:4', -1),

					'item_edit'				=> array('UINT', 0),
					'item_edit_cnt'			=> array('UINT', 0),
					'item_edit_time'		=> array('TIMESTAMP', 0),
					'item_edit_reason'		=> array('STEXT_UNI', ''),

					'item_delete'			=> array('UINT', 0),
					'item_delete_time'		=> array('TIMESTAMP', 0),
					'item_delete_reason'	=> array('STEXT_UNI', ''),
				),
				'PRIMARY_KEY'	=> 'item_id',
				'KEYS'			=> array(
					'user_id'				=> array('INDEX', 'user_id'),
					'item_name'				=> array('INDEX', 'item_name'),
					'item_approved'			=> array('INDEX', 'item_approved'),
					'item_reported'			=> array('INDEX', 'item_reported'),
					'item_delete'			=> array('INDEX', 'item_delete'),
				),
			)),

			array('phpbb_shop_plugins', array(
				'COLUMNS'		=> array(
					'plugin_id'				=> array('UINT', NULL, 'auto_increment'),
					'plugin_name'			=> array('STEXT_UNI', '', 'true_sort'),
					'plugin_enabled'		=> array('BOOL', 0),
					'plugin_version'		=> array('XSTEXT_UNI', '', 'true_sort'),
				),
				'PRIMARY_KEY'	=> 'plugin_id',
				'KEYS'			=> array(
					'plugin_name'			=> array('INDEX', 'plugin_name'),
					'plugin_enabled'		=> array('INDEX', 'plugin_enabled'),
				),
			)),
		),

		'table_column_add' => array(
			array('phpbb_users', 'shopbb_points', array('UINT', 0)),
		),

		'cache_purge' => array(
			'template',
			'imageset',
			'theme',
			'',
		),
	),
);

?>